home *** CD-ROM | disk | FTP | other *** search
- on startMovie
- global max, movielist, limit, splist, reset, letgo, exitFrame, gSound, prev, gCurrentSprite, Double, Increment, Loudness
- set Loudness to the soundLevel
- set Increment to 1
- set Double to 0
- set gCurrentSprite to 3
- set prev to 0
- set gSound to 6
- set prev to 0
- set letgo to 0
- set reset to 0
- set the visible of sprite 19 to 0
- updateStage()
- set magcursor to [the number of cast "Clapboard"]
- set the cursor of sprite 1 to magcursor
- set the textSize of field "movie" to 24
- set the textSize of field "name" to 24
- repeat with i = 21 to 45
- puppetSprite(i, 1)
- end repeat
- set the visible of sprite 45 to 0
- initsel()
- set splist to [[195, 211], [195, 294], [195, 377], [443, 211], [443, 294], [443, 377]]
- set limit to 24
- set movielist to []
- hidebar()
- set max to count(movielist)
- when keyDown then globalkey
- puppetSprite(48, 1)
- set the visible of sprite 48 to 0
- updateStage()
- go("Options")
- updateStage()
- end
-
- on testbut
- global movielist
- if count(movielist) <= 0 then
- repeat with i = 12 to 18
- set the visible of sprite i to 0
- end repeat
- else
- repeat with i = 12 to 18
- set the visible of sprite i to 1
- end repeat
- end if
- end
-
- on setdef
- repeat with i = 12 to 18
- set the visible of sprite i to 1
- end repeat
- end
-
- on addbar x
- global letgo, movielist
- put "inside addbar"
- if count(movielist) >= 24 then
- exit
- end if
- set letgo to 0
- set yu to string(item 1 of the name of cast the castNum of sprite x)
- add(movielist, yu)
- set max to count(movielist)
- reset()
- setbar()
- end
-
- on addbarC x
- global letgo, movielist
- if count(movielist) >= 24 then
- exit
- end if
- set letgo to 0
- set vu to the number of cast string(chars(the name of cast the castNum of sprite x, 1, 2) & "s")
- set yu to string(item 1 of the name of cast vu)
- add(movielist, yu)
- set max to count(movielist)
- set the castNum of sprite (20 + max) to vu
- updateStage()
- showbar()
- reset()
- end
-
- on showbar
- global movielist, max, limit
- set the visible of sprite 2 to 1
- repeat with i = 21 to 20 + count(movielist)
- set the visible of sprite i to 1
- end repeat
- repeat with i = 20 + count(movielist) + 1 to 20 + limit
- set the visible of sprite i to 0
- end repeat
- updateStage()
- end
-
- on showbarB
- global movielist, max, limit
- set the visible of sprite 2 to 1
- repeat with i = 21 to 20 + count(movielist)
- set the visible of sprite i to 1
- end repeat
- repeat with i = 20 + count(movielist) + 1 to 20 + limit
- set the visible of sprite i to 0
- end repeat
- end
-
- on hidebar
- global movielist, max, limit
- if the frame > 18 then
- set the visible of sprite 2 to 0
- end if
- repeat with i = 21 to 20 + limit
- set the visible of sprite i to 0
- end repeat
- updateStage()
- end
-
- on setbar
- global movielist, max, selected, limit, Double
- put "inside setbar"
- if count(movielist) = 0 then
- repeat with i = 21 to 20 + limit
- set the visible of sprite i to 0
- end repeat
- exit
- end if
- repeat with i = 1 to count(movielist)
- set the castNum of sprite (20 + i) to the number of cast string(getAt(movielist, i))
- end repeat
- repeat with i = 1 to count(selected)
- if getAt(selected, i) = 1 then
- if Double = 0 then
- set the ink of sprite (20 + i) to 4
- put "above puppetSprite 45 is true"
- puppetSprite(45, 1)
- set the moveableSprite of sprite 45 to 1
- set newsprite to 20 + i
- set the locH of sprite 45 to the locH of sprite newsprite
- set the locV of sprite 45 to the locV of sprite newsprite
- set the visible of sprite 45 to 1
- set the moveableSprite of sprite 45 to 0
- updateStage()
- end if
- next repeat
- end if
- set the ink of sprite (20 + i) to 0
- end repeat
- if Double = 0 then
- showbar()
- end if
- end
-
- on setbarB
- global movielist, max, selected, limit, Double
- put "inside setbar"
- if count(movielist) = 0 then
- repeat with i = 21 to 20 + limit
- set the visible of sprite i to 0
- end repeat
- exit
- end if
- repeat with i = 1 to count(movielist)
- set the castNum of sprite (20 + i) to the number of cast string(getAt(movielist, i))
- end repeat
- repeat with i = 1 to count(selected)
- if getAt(selected, i) = 1 then
- if Double = 0 then
- set the ink of sprite (20 + i) to 4
- put "above puppetSprite 45 is true"
- puppetSprite(45, 1)
- set the moveableSprite of sprite 45 to 1
- set newsprite to 20 + i
- set the locH of sprite 45 to the locH of sprite newsprite
- set the locV of sprite 45 to the locV of sprite newsprite
- set the visible of sprite 45 to 1
- set the moveableSprite of sprite 45 to 0
- end if
- next repeat
- end if
- set the ink of sprite (20 + i) to 0
- end repeat
- if Double = 0 then
- showbarB()
- end if
- end
-
- on namesmall
- set x1 to 100
- repeat with i = 1 to 36
- set yur to numToChar(charToNum("`") + (i / 6) + 1)
- set the name of cast (i + x1) to string(yur & i mod 6) & "s"
- if (i mod 6) = 0 then
- set the name of cast (i + x1) to string(numToChar(charToNum(yur) - 1) & "6") & "s"
- end if
- end repeat
- end
-
- on namemov
- set x1 to 136
- repeat with i = 1 to 36
- set yur to numToChar(charToNum("`") + (i / 6) + 1)
- set the name of cast (i + x1) to string(yur & i mod 6) & ".mov"
- if (i mod 6) = 0 then
- set the name of cast (i + x1) to string(numToChar(charToNum(yur) - 1) & "6") & ".mov"
- end if
- end repeat
- end
-
- on initsp
- global splist
- set splist to []
- set x to 3
- repeat with i = x to x + 5
- add(splist, [the locH of sprite i, the locV of sprite i])
- end repeat
- end
-
- on reset
- global splist, reset
- if the frame = 56 then
- exit
- end if
- set x to 13
- repeat with i = x to x + 5
- set yu to getAt(splist, i - x + 1)
- set the locH of sprite i to getAt(yu, 1)
- set the locV of sprite i to getAt(yu, 2)
- set the castNum of sprite i to the number of cast string(chars(the name of cast the castNum of sprite i, 1, 2))
- set the ink of sprite i to 0
- updateStage()
- end repeat
- updateStage()
- end
-
- on playmovn
- set yu to the clickOn
- puppetSprite(48, 1)
- set the castNum of sprite 48 to the number of cast string(chars(the name of cast the castNum of sprite yu, 1, 2) & ".MOV")
- set the visible of sprite 48 to 1
- set the movieTime of sprite 48 to 0
- set the movieRate of sprite 48 to 1
- repeat while (the movieTime of sprite 48 < the duration of cast the castNum of sprite 48) and the controlDown
- updateStage()
- end repeat
- set the movieTime of sprite 48 to 0
- set the movieRate of sprite 48 to 0
- set the visible of sprite 48 to 0
- end
-
- on playmovn2
- set yu to the clickOn
- puppetSprite(48, 1)
- set yu to 0
- repeat with i = 1 to count(movielist)
- if getAt(selected, i) = 1 then
- set yu to i
- end if
- if yu <> 0 then
- exit repeat
- end if
- end repeat
- if yu = 0 then
- exit
- end if
- set yu to yu + 20
- set the castNum of sprite 48 to the number of cast string(chars(the name of cast the castNum of sprite yu, 1, 2) & ".MOV")
- set the visible of sprite 48 to 1
- updateStage()
- set the movieTime of sprite 48 to 0
- set the movieRate of sprite 48 to 1
- updateStage()
- repeat while (the movieTime of sprite 48 < the duration of cast the castNum of sprite 48) and not (the controlDown)
- updateStage()
- end repeat
- set the movieTime of sprite 48 to 0
- set the movieRate of sprite 48 to 0
- set the visible of sprite 48 to 0
- updateStage()
- repeat with x = 13 to 18
- set the visible of sprite x to 1
- end repeat
- updateStage()
- end
-
- on playmovn3
- global prev
- if prev = 1 then
- set yu to the clickOn
- puppetSprite(48, 1)
- set yu to 0
- repeat with i = 1 to count(movielist)
- if getAt(selected, i) = 1 then
- set yu to i
- set the visible of sprite 19 to 1
- puppetSound(0)
- updateStage()
- end if
- if yu <> 0 then
- exit repeat
- end if
- end repeat
- if yu = 0 then
- set prev to 0
- exit
- end if
- set yu to yu + 20
- set the castNum of sprite 48 to the number of cast string(chars(the name of cast the castNum of sprite yu, 1, 2) & ".MOV")
- set the visible of sprite 48 to 1
- updateStage()
- set the movieTime of sprite 48 to 0
- set the movieRate of sprite 48 to 1
- updateStage()
- set prev to 2
- end if
- if (the movieTime of sprite 48 < the duration of cast the castNum of sprite 48) and not (the controlDown) then
- updateStage()
- else
- set prev to 0
- set the movieTime of sprite 48 to 0
- set the movieRate of sprite 48 to 0
- set the visible of sprite 48 to 0
- updateStage()
- set the visible of sprite 19 to 0
- repeat with x = 13 to 18
- set the visible of sprite x to 1
- end repeat
- repeat with x = 3 to 8
- puppetSprite(x, 1)
- set the visible of sprite x to 1
- puppetSprite(x, 0)
- end repeat
- puppetSprite(20, 1)
- set the visible of sprite 20 to 1
- puppetSprite(20, 0)
- puppetSound("OPEN.AIF")
- play done
- updateStage()
- end if
- end
-
- on playmovn4 yu
- global k, mm
- set yu to yu + 20
- set i to chars(the name of cast the castNum of sprite yu, 1, 3)
- set place to getOne(movielist, i)
- set k to place
- set mm to place
- set the castNum of sprite 48 to the number of cast string(chars(the name of cast the castNum of sprite yu, 1, 2) & ".MOV")
- set the visible of sprite 48 to 1
- updateStage()
- set the movieTime of sprite 48 to 0
- set the movieRate of sprite 48 to 1
- updateStage()
- end
-
- on initsel
- global selected
- set selected to [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
- end
-
- on delset
- global selected, movielist
- if count(movielist) <= 0 then
- exit
- end if
- set sel to countsel()
- if sel = 0 then
- exit
- end if
- set del to []
- repeat with i = 1 to count(movielist)
- if getAt(selected, i) = 1 then
- setAt(movielist, i, 0)
- end if
- end repeat
- put del
- set mv2 to []
- repeat with i in movielist
- if i <> 0 then
- add(mv2, i)
- end if
- end repeat
- set movielist to mv2
- set the visible of sprite 45 to 0
- updateStage()
- initsel()
- setbar()
- end
-
- on plusset
- global selected, movielist
- if count(movielist) <= 0 then
- exit
- end if
- set sel to countsel()
- if (sel = count(movielist)) or (sel = 0) then
- exit
- end if
- initsel()
- setAt(selected, sel, 1)
- repeat with i = count(movielist) - 1 down to 1
- if getAt(selected, i) = 1 then
- set yut to getAt(movielist, i)
- setAt(movielist, i, getAt(movielist, i + 1))
- setAt(movielist, i + 1, yut)
- deleteAt(selected, count(selected))
- addAt(selected, 1, 0)
- exit repeat
- end if
- end repeat
- put "inside plusset"
- setbar()
- end
-
- on minset
- global selected, movielist
- if count(movielist) <= 0 then
- exit
- end if
- if getAt(selected, 1) = 1 then
- exit
- end if
- set sel to countsel()
- if sel = 0 then
- exit
- end if
- initsel()
- setAt(selected, sel, 1)
- repeat with i = 1 to count(movielist)
- if getAt(selected, i) = 1 then
- set yut to getAt(movielist, i)
- deleteAt(movielist, i)
- add(movielist, i - 1, yut)
- deleteAt(selected, 1)
- add(selected, 0)
- exit repeat
- end if
- end repeat
- put "inside minset"
- setbar()
- end
-
- on countsel
- repeat with i = 1 to count(selected)
- if getAt(selected, i) = 1 then
- return i
- exit
- end if
- end repeat
- return 0
- end
-
- on clearall
- global movielist
- set movielist to []
- set the visible of sprite 45 to 0
- initsel()
- put "inside clearall"
- setbar()
- end
-
- on globalkey
- if the key = BACKSPACE then
- delset()
- end if
- if the key = "+" then
- plusset()
- end if
- if the key = "-" then
- minset()
- end if
- end
-
- on compilemov
- global movielist, comp, k, mm, Double
- if k = 0 then
- puppetSprite(48, 1)
- set k to 0
- set mm to 1
- end if
- if k <> mm then
- set k to mm
- if k <= count(movielist) then
- set i to getAt(movielist, k)
- initsel()
- setAt(selected, k, 1)
- if Double = 0 then
- setbar()
- end if
- put "just after set bar"
- set j to chars(i, 1, 2)
- set Dump to the castNum of sprite 48
- set the castNum of sprite 48 to the number of cast (j & ".mov")
- unLoadCast(Dump)
- set the directToStage of cast the castNum of sprite 48 to 1
- set the visible of sprite 48 to 1
- updateStage()
- set the movieTime of sprite 48 to 0
- set the movieRate of sprite 48 to 1
- updateStage()
- else
- set the visible of sprite 48 to 0
- puppetSprite(48, 0)
- set comp to 0
- set k to 0
- puppetSprite(1, 0)
- set Double to 0
- setbarB()
- go("EndMovie")
- end if
- end if
- if the movieTime of sprite 48 < the duration of cast the castNum of sprite 48 then
- updateStage()
- else
- set the movieRate of sprite 48 to 0
- set mm to mm + 1
- end if
- end
-
- on quitmov
- global comp, k, m
- set the visible of sprite 48 to 0
- puppetSprite(48, 0)
- set comp to 0
- set k to 0
- end
-
- on RunOff
- global gCurrentSprite
- set the editableText of sprite gCurrentSprite to 0
- if gCurrentSprite = 3 then
- set gCurrentSprite to 4
- updateStage()
- else
- set gCurrentSprite to 3
- testbut()
- setdef()
- go("no")
- showbar()
- end if
- end
-
- on beginMyMovie
- global myWindow
- if objectp(myWindow) then
- forget(myWindow)
- end if
- set horzOrigin to the stageLeft
- set vertOrigin to the stageTop
- set myWindowRect to rect(horzOrigin, vertOrigin, horzOrigin + 640, vertOrigin + 480)
- set myWindow to window "HelpMovie"
- set the rect of myWindow to myWindowRect
- set the fileName of myWindow to "HLP.DIR"
- set the titleVisible of myWindow to 0
- open(myWindow)
- tell window "HelpMovie"
- go("Fstart")
- end tell
- end
-
- on finishMovie
- global myWindow
- if objectp(myWindow) then
- forget(myWindow)
- end if
- end
-
- on MovieOver
- global myWindow
- if objectp(myWindow) then
- forget(myWindow)
- end if
- end
-
- on DoubleScreen
- global Double
- if Double = 0 then
- if the visible of sprite 48 = 1 then
- set MovHt to 480
- set MovWd to 640
- set the height of sprite 48 to MovHt
- set the width of sprite 48 to MovWd
- set Back to the locV of sprite 1
- set Back to Back + 1
- puppetSprite(1, 1)
- set the moveableSprite of sprite 1 to 1
- set the locV of sprite 1 to Back
- set the moveableSprite of sprite 1 to 0
- puppetSprite(1, 0)
- updateStage()
- set Double to 1
- end if
- end if
- end
-
- on HalfScreen
- global Double
- put "inside double mouseup"
- if Double = 1 then
- set Back to the locV of sprite 1
- set Back to Back - 1
- set the locV of sprite 1 to Back
- set the height of sprite 48 to 240
- set the width of sprite 48 to 320
- updateStage()
- set Double to 0
- end if
- end
-